// 
const debounce = (callback, t = 500) => {
  let timer = null
  return (...args) => {
    clearTimeout(timer)
    timer = setTimeout(() => {
      callback.call(this, ...args)
    }, t)
  }
}


export default debounce